const mysql=require('mysql')

module.exports={
    db(sql,arr,fun){
        let dbsql=mysql.createConnection({
            host:'localhost',
            port:'3306',
            user:'root',
            password:'123456',
            database:'data1'
        })
        dbsql.connect()
        dbsql.query(sql,arr,fun)
        dbsql.end()
    }
}